package com.example.demo.order.service.impl;

import com.example.demo.order.entity.OOrderFeeDetail;
import com.example.demo.order.mapper.OOrderFeeDetailMapper;
import com.example.demo.order.service.IOOrderFeeDetailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.order.vo.OOrderFeeDetailVo;
import com.example.demo.order.vo.OOrderManageVo;
import com.example.demo.util.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 订单费用明细表; 服务实现类
 * </p>
 *
 * @author tao
 * @since 2024-11-26
 */
@Service("oOrderFeeDetailService")
public class OOrderFeeDetailServiceImpl extends ServiceImpl<OOrderFeeDetailMapper, OOrderFeeDetail> implements IOOrderFeeDetailService {

    @Autowired
    private OOrderFeeDetailMapper oOrderFeeDetailMapper;

    @Override
    public Result<?> getOOrderFeeDetailList(String orderNo) {
        OOrderManageVo oOrderManageVo = oOrderFeeDetailMapper.getOOrderFeeDetailList(orderNo);
        List<OOrderFeeDetailVo> oOrderFeeDetailVoList = oOrderFeeDetailMapper.getDetail(orderNo);
        oOrderManageVo.setOrderFeeDetailList(oOrderFeeDetailVoList);
        return Result.ok(oOrderManageVo);
    }
}
